<div class="coding-rules-detail-description rule-desc markdown">{{{htmlDesc}}}</div>

{{#unless isCustom}}
  <div class="coding-rules-detail-description coding-rules-detail-description-extra">
    <div id="coding-rules-detail-description-extra">
      {{#if htmlNote}}
        <div class="rule-desc spacer-bottom markdown">{{{htmlNote}}}</div>
      {{/if}}
      {{#if canCustomizeRule}}
        <div class="button-group">
          <button id="coding-rules-detail-extend-description">{{t 'coding_rules.extend_description'}}</button>
        </div>
      {{/if}}
    </div>

    {{#if canCustomizeRule}}
      <div class="coding-rules-detail-extend-description-form hidden">
        <table class="width100">
          <tbody>
          <tr>
            <td class="width100" colspan="2">
              <textarea id="coding-rules-detail-extend-description-text" rows="4"
                        style="width: 100%; margin-bottom: 4px;">{{mdNote}}</textarea>
            </td>
          </tr>
          <tr>
            <td>
              <div class="button-group">
                <button id="coding-rules-detail-extend-description-submit">{{t 'save'}}</button>
                {{#if mdNote}}
                  <button id="coding-rules-detail-extend-description-remove"
                          class="button-red">{{t 'remove'}}</button>
                {{/if}}
              </div>
              <a id="coding-rules-detail-extend-description-cancel" class="action">{{t 'cancel'}}</a>
            </td>
            <td class="text-right">
              {{> '../../../../components/common/templates/_markdown-tips' }}
            </td>
          </tr>
          </tbody>
        </table>
      </div>
    {{/if}}
  </div>
{{/unless}}
